package com.hgw.Demo06_CompositePattern.Exercises11_7_5;

/**
 * Data time:2021/12/15 16:57
 * StudentID:2019112118
 * Author:hgw
 * Description: 办公人员
 */
public class OfficeStaff extends AbstractFile{

    private String name;

    public OfficeStaff(String name) {
        this.name = name;
    }

    @Override
    public void add(AbstractFile file) {
        System.out.println("不支持该方法");
    }

    @Override
    public void remove(AbstractFile file) {
        System.out.println("不支持该方法");
    }

    @Override
    public AbstractFile getChild(int i) {
        System.out.println("不支持该方法");
        return null;
    }

    @Override
    public void operation() {
        System.out.println("----" +name + "收到文件");
    }
}
